package com.ly.aps.system.provider.controller;

import com.ly.aps.system.model.dto.ModeDTO;
import com.ly.aps.system.provider.service.ArchetypeService;
import com.stone.commons.core.model.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ly.aps.basedata.model.dto.CapacityDiscountDTO;
import com.ly.aps.system.provider.service.ArchetypeService;
import com.stone.commons.core.model.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: </br>
 * ClassName: CapacityDiscountController 履行中心产能折算率
 * @author: YangZhenfu
 * @date: 2021/7/9 19:29
 * @version: 1.0
 */
@Slf4j
@RestController
@RequestMapping("/archetype")
@Api(tags = "例子")
public class ArchetypeController {

    @Autowired
    private ArchetypeService archetypeService;

    /**
     * @description: 查询archetype
     * @param: companyId 公司ID
     * @param: ffCenterCode 履行中心编码
     * @return: ApiResult<List < CapacityDiscountDTO>> 结果集
     * @author: YangZhenfu
     * @date : 2021/7/7 16:56
     */
//    @ApiOperation(value = "查询履行中心产能折算率")
//    @RequestMapping(value = "/getCapacityDiscountList", method = RequestMethod.GET)
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "companyId", value = "公司编码", required = true),
//            @ApiImplicitParam(name = "ffCenterCode", value = "履行中心编码", required = false),
//            @ApiImplicitParam(name = "current", value = "当前页", required = true),
//            @ApiImplicitParam(name = "size", value = "每页数量", required = true)
//    })
//    public ApiResult<String> getCapacityDiscountList(@RequestParam(value = "companyId", required = true) String companyId,
//                                                     @RequestParam(value = "ffCenterCode", required = false) String ffCenterCode,
//                                                     @RequestParam(value = "current", required = true) long current,
//                                                     @RequestParam(value = "size", required = true) long size) {
//        Page<CapacityDiscountDTO> page = capacityDiscountService.getCapacityDiscountList(companyId, ffCenterCode, current, size);
//        return ApiResult.success(JSON.toJSONString(page));
//    }

    /**
     * @description: 新增履行中心产能折算率
     * @param: capacityDiscountVO
     * @return: ApiResult<String> 结果
     * @author: YangZhenfu
     * @date : 2021/7/10 13:56
     */
//    @ApiOperation(value = "新增履行中心产能折算率")
//    @PostMapping("/addCapacityDiscount")
//    public ApiResult<String> addCapacityDiscount(@RequestBody @Valid CapacityDiscountAddVO capacityDiscountAddVO) {
//        return capacityDiscountService.addCapacityDiscount(capacityDiscountAddVO);
//    }

    /**
     * @description:编辑履行中心产能折算率
     * @param: capacityDiscountVO
     * @return: ApiResult<String> 结果
     * @author: YangZhenfu
     * @date : 2021/7/10 13:56
     */
//    @ApiOperation(value = "编辑履行中心产能折算率")
//    @RequestMapping(value = "/updateCapacityDiscount", method = RequestMethod.POST)
//    public ApiResult<String> updateCapacityDiscount(@RequestBody @Valid CapacityDiscountVO capacityDiscountVO) {
//        return capacityDiscountService.updateCapacityDiscount(capacityDiscountVO);
//    }

    /**
     * @description:删除履行中心产能折算率
     * @param: capacityDiscountDeleteVO
     * @return: ApiResult<String> 结果
     * @author: YangZhenfu
     * @date : 2021/7/10 13:56
     */
//    @ApiOperation(value = "删除履行中心产能折算率")
//    @RequestMapping(value = "/deleteCapacityDiscount", method = RequestMethod.POST)
//    public ApiResult<String> deleteCapacityDiscount(@RequestBody @Valid CapacityDiscountDeleteVO capacityDiscountDeleteVO) {
//        return capacityDiscountService.deleteCapacityDiscount(capacityDiscountDeleteVO);
//    }
}
